<?php

namespace App\Models\Labaicai;

use Illuminate\Database\Eloquent\Model;

/**
 * App\Models\Labaicai\DailyDiet
 *
 * @property int $id
 * @property int $category_id
 * @property int $food_id
 * @property \Illuminate\Support\Carbon $created_at
 * @property int|null $number
 * @property int|null $type
 * @property float|null $consum_heat
 * @property-read \Illuminate\Database\Eloquent\Collection|\App\Models\Labaicai\Fooods[] $foods
 * @property-read int|null $foods_count
 * @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Labaicai\DailyDiet filter()
 * @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Labaicai\DailyDiet newModelQuery()
 * @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Labaicai\DailyDiet newQuery()
 * @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Labaicai\DailyDiet query()
 * @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Labaicai\DailyDiet whereCategoryId($value)
 * @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Labaicai\DailyDiet whereConsumHeat($value)
 * @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Labaicai\DailyDiet whereCreatedAt($value)
 * @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Labaicai\DailyDiet whereFoodId($value)
 * @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Labaicai\DailyDiet whereId($value)
 * @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Labaicai\DailyDiet whereNumber($value)
 * @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Labaicai\DailyDiet whereType($value)
 * @mixin \Eloquent
 */
class DailyDiet extends Model
{
    protected $table = 'daily_diet';
    protected $fillable = [];

    public function scopeFilter($query)
    {
        //
    }

    public function foods()
    {
        return $this->hasMany(Fooods::class, 'id');
    }
}
